import Cookies from 'js-cookie'

const TokenKey = 'heima_renzi_token2'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

const timestamp = 'heima_renzi_timestamp2'

// 设置时间错
export function setTimestamp() {
  return Cookies.set(timestamp, Date.now())
}

// 获取时间戳
export function getTimestamp() {
  return Cookies.get(timestamp)
}
